import {IBaseInfo} from "@/@types/main"
import {loginByCredentials} from "@/utils"
const solve = (loginInfo: IBaseInfo) => {
  const userLoginInfo = JSON.parse(loginInfo.token)
  const info = {
    site: userLoginInfo.site,
    pwd: {
      name: userLoginInfo.name,
      pwd: userLoginInfo.pwd
    }
  }
  const className = {
    username: "input[name='os_username']",
    password: "input[name='os_password']",
    loginBtn: "input[type='submit']"
  }
  loginByCredentials(info, className)
  
}

export default {
  solve
}
